<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    <link href="erzu/css/style.css" rel="stylesheet" type="text/css" />

    <script src="../vue.min.js"></script>
    <script src="../axios.min.js"></script>

    <script type="text/javascript" src="erzu/js/jquery.js"></script>
    <script language="javascript">
        $(function(){
            //导航切换
            $(".imglist li").click(function(){
                $(".imglist li.selected").removeClass("selected")
                $(this).addClass("selected");
            })
        })
    </script>
    <script type="text/javascript">
        $(document).ready(function(){
            $(".click").click(function(){
                $(".tip").fadeIn(200);
            });

            $(".tiptop a").click(function(){
                $(".tip").fadeOut(200);
            });

            $(".sure").click(function(){
                $(".tip").fadeOut(100);
            });

            $(".cancel").click(function(){
                $(".tip").fadeOut(100);
            });

        });
    </script>
</head>


<body>

<!-- <div class="place">
    <span>位置：</span>
    <ul class="placeul">
        <li><a href="#">首页</a></li>
        <li><a href="imglist.html">管理员页面</a></li>

    </ul>
</div> -->
<div id="app">
<!--<br>
    <a href="log.html?role_id=3" class="ibtn">查看BI工作记录</a>
    <a href="log.html?role_id=2" class="ibtn">查看DBI工作记录</a>

<br>
<br>-->

<div class="leftinfo">
    <div class="listtitle">日志系统</div>
    <table class="imgtable">
        <tr>
            <!-- <td></td> -->
            <td>操作人</td>
            <td>操作时间</td>
            <td>操作方法</td>
            <td>操作状态</td>
            <td>操作</td>

        </tr>
        <tr v-for="item in historyList">
            <!-- <td><input name="" type="checkbox" value=""/></td> -->
            <td>{{item.operator}}</td>
            <td>{{item.operationDate}}</td>
            <td>{{item.operationMethod}}</td>
            <td>{{item.operationResult}}</td>
            <td>{{item.methodName}}</td>
            <!-- <td><input type="button" class="ibtn" value="审核通过" @click="audit(item.status,'1')"/>
                <input type="button"  class="ibtn" value="审核未通过" @click="audit(item.status,'0')"/>
            </td> -->
        </tr>
    </table>
</div>



<div class="pagin">
    <div class="message">共<i class="blue">{{pageUtil.totalCount}}</i>条记录，当前显示第&nbsp;<i class="blue">{{pageUtil.currentPage}}&nbsp;</i>页</div>
    <ul class="paginList">
        <li class="paginItem"><a @click="gethistoryList(pageUtil.currentPage-1)"><span class="pagepre" ></span></a></li>
        <!-- <li class="paginItem"><a @click="gethistoryList(1)" >1</a></li>
        <li class="paginItem"><a @click="gethistoryList(2)">2</a></li>
        <li class="paginItem"><a @click="gethistoryList(3)">3</a></li>
        <li class="paginItem"><a @click="gethistoryList(4)">4</a></li>
        <li class="paginItem"><a @click="gethistoryList(5)">5</a></li>
        <li class="paginItem more"><a href="javascript:;">...</a></li>
        <li class="paginItem"><a @click="gethistoryList(pageUtil.totalPage)">{{pageUtil.totalPage}}</a></li> -->
        <li class="paginItem"><a @click="gethistoryList(pageUtil.currentPage+1)"><span class="pagenxt"></span></a></li>
    </ul>
</div>
</div>



<script type="text/javascript">
    $('.imgtable tbody tr:odd').addClass('odd');
</script>
</body>
<script>
    new Vue({
        el:"#app,#bpp",
        data: {
            historyList:[],
            pageUtil:{
                currentPage:1,
                prevPage:0,
                nextPage:2,
	            totalPage:1,
	            totalCount:10,
	            pageSize:10,
	            startIndex:0
            }
        },
        created:function() {
            this.gethistoryList(this.pageUtil.currentPage);
        },
        methods: {
            gethistoryList:function (pageNum) {
                if(pageNum>=this.pageUtil.totalPage){
                    pageNum=this.pageUtil.totalPage;
                }
                var Authorization = localStorage.getItem('Authorization');
                _this=this;
                axios.get("http://localhost:9005/admin/adminController/findAllLog/"+pageNum,{headers: {'Authorization': Authorization}}).then(function (result) {
                    _this.historyList=result.data.data.list;
                    _this.pageUtil = result.data.data.pageUtil;
                }).catch(function (error) {
                  if (5102 == error.response.status) {

                      alert("无权限");
                      location.href="wuquan.html";
                      
                  }
              })
            },
            
        }
    })
</script>
</html>
